<template>
  <el-container>
    <el-header>header</el-header>
    <el-container>
      <el-aside>
        <el-menu
          background-color="#545c64"
          text-color="#fff"
          active-text-color="#ffd04b"
          unique-opened
          :default-openeds="['1']"
          default-active="1-1"
          router
        >
          <el-submenu index="1">
            <template slot="title">
              <i class="el-icon-location"></i>
              <span>新闻管理</span>
            </template>
            <el-menu-item index="/addNews">添加新闻</el-menu-item>
            <el-menu-item index="/newsList">新闻列表</el-menu-item>
          </el-submenu>
          <el-submenu index="2">
            <template slot="title">
              <i class="el-icon-menu"></i>
              <span>类别管理</span>
            </template>
            <el-menu-item index="2-1">选项1</el-menu-item>
            <el-menu-item index="2-2">选项2</el-menu-item>
          </el-submenu>
          <el-submenu index="3">
            <template slot="title">
              <i class="el-icon-setting"></i>
              <span>导航三</span>
            </template>
            <el-menu-item index="3-1">选项1</el-menu-item>
            <el-menu-item index="3-2">选项2</el-menu-item>
          </el-submenu>
        </el-menu>
        <router-link :to="{path:'/button',query:{a:1}}"><h1>第一个超链接</h1></router-link>
        <router-link :to="{path:'/button',query:{a:2}}"><h1>第二个超链接</h1></router-link>
      </el-aside>
      <el-main><router-view/></el-main>
    </el-container>
    <el-footer>footer</el-footer>
  </el-container>
</template>

<script>
    export default {
        name: "home",
    }
</script>

<style scoped>
  .el-container{
    border: solid 1px red;
  }
  .el-header{
    border: dotted 1px yellow;
  }
  .el-aside{
    border: dotted 1px aquamarine;
  }
  .el-main{
    border: dotted 1px green;
  }
  .el-footer{
    border: dotted 1px gray;
  }
</style>
